OpenStack Kilo : Configure Swift#1 ( Control Node )
2015/06/20 |
Configure OpenStack Object Storage (Swift).
This example shows to configure like the environment below.
| +------------------+ | +-----------------+ | [ Control Node ] |10.0.0.30 | 10.0.0.50| [ Proxy Node ] | | Keystone |-----------+-----------| | +------------------+ | +-----------------+ | +---------------------------+--------------------------+ | | | |10.0.0.71 |10.0.0.72 |10.0.0.73 +-------+----------+ +--------+---------+ +--------+---------+ | [Storage Node#1] | | [Storage Node#2] | | [Storage Node#3] | | |-------| |-------| | +------------------+ +------------------+ +------------------+ |
[1] | Add Swift user or service on Keystone Server (Control Node) first. |
# add swift user [root@dlp ~(keystone)]# openstack user create --project service --password servicepassword swift +------------+----------------------------------+ | Field | Value | +------------+----------------------------------+ | email | None | | enabled | True | | id | b2f2c396a44a466fb8740591b010f99b | | name | swift | | project_id | 4e84300cbeeb4a68a0e1864ea0ae1869 | | username | swift | +------------+----------------------------------+ # add swift user in admin role [root@dlp ~(keystone)]# openstack role add --project service --user swift admin +-------+----------------------------------+ | Field | Value | +-------+----------------------------------+ | id | 2100956a1c974cae8c81308845c174a8 | | name | admin | +-------+----------------------------------+ # add an entry for swift service [root@dlp ~(keystone)]# openstack service create --name swift --description "OpenStack Object Storage" object-store +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | OpenStack Object Storage | | enabled | True | | id | 4703bd767e8241369786af643d3bd5bc | | name | swift | | type | object-store | +-------------+----------------------------------+ # define the IP address of Proxy Node [root@dlp ~(keystone)]# export swift_proxy=10.0.0.50
# add an entry for swift endpoint [root@dlp ~(keystone)]# openstack endpoint create \ --publicurl http://$swift_proxy:8080/v1/AUTH_%\(tenant_id\)s \ --internalurl http://$swift_proxy:8080/v1/AUTH_%\(tenant_id\)s \ --adminurl http://$swift_proxy:8080 \ --region RegionOne \ object-store +--------------+---------------------------------------------+ | Field | Value | +--------------+---------------------------------------------+ | adminurl | http://10.0.0.50:8080 | | id | 93c74e3247974eb89c774ce0927d932b | | internalurl | http://10.0.0.50:8080/v1/AUTH_%(tenant_id)s | | publicurl | http://10.0.0.50:8080/v1/AUTH_%(tenant_id)s | | region | RegionOne | | service_id | 4703bd767e8241369786af643d3bd5bc | | service_name | swift | | service_type | object-store | +--------------+---------------------------------------------+ |